/**
 * 全局样式
 */

/* CSS 变量定义 - 主题系统 */
:root {
  /* 主题颜色 */
  --theme-primary: #409EFF;
  --theme-bg: #ffffff;
  --theme-text: #333333;
  --theme-bg-secondary: #f5f5f5;
  --theme-border: #e8e8e8;
  --theme-shadow: rgba(0, 0, 0, 0.1);
  
  /* 字体大小 */
  --font-size-base: 14px;
  --font-size-small: 12px;
  --font-size-large: 16px;
  
  /* 动画时长 */
  --animation-duration: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--theme-bg-secondary);
  color: var(--theme-text);
  font-size: var(--font-size-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--animation-duration), color var(--animation-duration);
}

#app {
  transition: background var(--animation-duration), color var(--animation-duration);
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
  html {
    font-size: 14px;
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Element UI 移动端优化 */
.el-message {
  min-width: 280px !important;
  max-width: 90vw !important;
}

.el-drawer__wrapper {
  outline: none;
}

/* 移动端Toast通知样式优化 */
.el-notification {
  transition: all var(--animation-duration);
}

.mobile-toast {
  min-width: 280px !important;
  max-width: 90vw !important;
  padding: 15px 20px !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.mobile-toast .el-notification__title {
  display: none;
}

.mobile-toast .el-notification__content {
  margin: 0 !important;
  text-align: center;
  font-size: 15px !important;
  font-weight: 500;
  color: #333;
}

.mobile-toast.el-notification--success {
  background: #f0f9ff !important;
  border-left: 4px solid #67c23a !important;
}

.mobile-toast.el-notification--success .el-notification__content {
  color: #67c23a;
}

.mobile-toast.el-notification--info {
  background: #f4f4f5 !important;
  border-left: 4px solid #909399 !important;
}

.mobile-toast.el-notification--info .el-notification__content {
  color: #606266;
}

.mobile-toast.el-notification--warning {
  background: #fdf6ec !important;
  border-left: 4px solid #e6a23c !important;
}

.mobile-toast.el-notification--warning .el-notification__content {
  color: #e6a23c;
}

.mobile-toast.el-notification--error {
  background: #fef0f0 !important;
  border-left: 4px solid #f56c6c !important;
}

.mobile-toast.el-notification--error .el-notification__content {
  color: #f56c6c;
}

.mobile-toast .el-notification__icon {
  font-size: 24px !important;
  margin-right: 10px;
}

/* 大号Toast样式（用于保存成功等重要提示） */
.mobile-toast-large {
  min-width: 300px !important;
  max-width: 90vw !important;
  padding: 20px !important;
  border-radius: 12px !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2) !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: none !important;
}

.mobile-toast-large .el-notification__title {
  color: white !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  margin-bottom: 8px !important;
}

.mobile-toast-large .el-notification__content {
  color: white !important;
  font-size: 14px !important;
  opacity: 0.95;
  margin: 0 !important;
}

.mobile-toast-large .el-notification__icon {
  color: white !important;
  font-size: 28px !important;
}

.mobile-toast-large .el-notification__closeBtn {
  color: white !important;
  opacity: 0.8;
}

.mobile-toast-large .el-notification__closeBtn:hover {
  opacity: 1;
}

/* 禁止文本选择（移动端体验优化） */
.no-select {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* 触摸反馈 */
.tap-highlight {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

/* 移动端确认对话框样式 - 简洁风格 */
.mobile-confirm-dialog {
  border-radius: 16px !important;
  max-width: 300px !important;
  width: 300px !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
  background: white !important;
}

/* 隐藏默认关闭按钮 */
.mobile-confirm-dialog .el-message-box__headerbtn {
  display: none !important;
}

/* 标题区域 */
.mobile-confirm-dialog .el-message-box__header {
  padding: 24px 24px 16px !important;
  border-bottom: none !important;
  text-align: center !important;
}

.mobile-confirm-dialog .el-message-box__title {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #333 !important;
  line-height: 1.4 !important;
}

/* 内容区域 */
.mobile-confirm-dialog .el-message-box__content {
  padding: 0 24px 24px !important;
  text-align: center !important;
}

.mobile-confirm-dialog .el-message-box__container {
  position: relative !important;
  display: block !important;
}

.mobile-confirm-dialog .el-message-box__message {
  font-size: 14px !important;
  line-height: 1.8 !important;
  color: #666 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.mobile-confirm-dialog .el-message-box__message p {
  margin: 0 !important;
}

/* 隐藏默认图标 */
.mobile-confirm-dialog .el-message-box__status {
  display: none !important;
}

/* 隐藏自定义图标 */
.mobile-confirm-dialog .custom-icon {
  display: none !important;
}

/* 按钮区域 - 并排显示 */
.mobile-confirm-dialog .el-message-box__btns {
  padding: 0 24px 24px !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 12px !important;
  margin: 0 !important;
}

.mobile-confirm-dialog .el-message-box__btns button {
  flex: 1 !important;
  margin: 0 !important;
  height: 44px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  border-radius: 8px !important;
  border: none !important;
  transition: all 0.3s ease !important;
}

/* 取消按钮（次要操作）- 灰色 */
.mobile-cancel-btn {
  background: #f5f5f5 !important;
  color: #666 !important;
  box-shadow: none !important;
}

.mobile-cancel-btn:active {
  background: #e0e0e0 !important;
  transform: scale(0.98);
}

/* 确认按钮（主要操作）- 蓝色背景白色字体 */
.mobile-confirm-btn {
  background: #409EFF !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3) !important;
}

.mobile-confirm-btn:active {
  background: #3a8ee6 !important;
  transform: scale(0.98);
  box-shadow: 0 1px 4px rgba(64, 158, 255, 0.3) !important;
}

/* 只有一个按钮时，让确认按钮更突出 */
.mobile-confirm-dialog .el-message-box__btns button:only-child {
  background: #409EFF !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3) !important;
}

/* 移动端对话框遮罩层 */
.v-modal {
  background-color: rgba(0, 0, 0, 0.5) !important;
}

/* MessageBox 动画优化 */
.el-message-box {
  animation: messageBoxFadeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes messageBoxFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-30px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}


